#include "Factory.h"

Product* Factory::CreateProduct(const char* product_name)
{
	if (strcmp(product_name, "ProductA") == 0)
		return new ProductA;
	else if (strcmp(product_name, "ProductB") == 0)
		return new ProductB;

	return NULL;
}

int Factory::DestroyProduct(Product* p)
{
	if (p)
		delete p;

	return 0;
}
